var d=document.properties["dlswr:closeDate"];
var curr_date = d.getDate();
var curr_month = d.getMonth() + 1; 
var curr_year = d.getFullYear();
var date_name=curr_date + "-" + curr_month + "-" + curr_year;
//dont use document.name update with 4.0.0 since some background deleting seems to happen
//document.name=document.properties["dlswr:customerName"]+"_"+date_name;
document.properties['cm:name'] = document.properties["dlswr:customerName"]+"_"+date_name;
//remove first groupping indicator n -
document.properties['dlswr:customerRegionFiltered'] = document.properties['dlswr:customerRegion'].substring(3);
document.properties['dlswr:customerCountryFiltered'] = document.properties['dlswr:customerCountry'].substring(3);
document.properties['dlswr:typeFlag'] = "SWR";
document.properties['dlswr:likes'] = document.properties['cm:likesRatingSchemeCount']!=null?document.properties['cm:likesRatingSchemeCount']:0;
document.save();

